home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / ra / ruc11.zip / RUC.TXT < prev    next >
Text File  |  1992-02-03  |  11KB  |  268 lines

  1. (C) Copyright,  David H. Bennett, 1992
  2.  
  3. Program : RUC - RemoteAccess User Command Line Editor
  4. David Bennett / 2/3/92 / Ver 1.1
  5.  
  6. This program will allow you make changes to a USERS.BBS record via the
  7. command line or batch file.
  8.  
  9. Why RUC (and other 'license' type stuff) (ewww he's so professional!)
  10.  
  11.   I originally wrote this program to automate the registration process for
  12.   new users.  Since I use a mail in registration,  It made it a lot easier
  13.   for me to create a batch file that would reset a few flags,  upgrade the
  14.   users security level,  optionally allow giving them some long distance
  15.   netmail credit,  and posting a message to that user (Using the IMTHINGS
  16.   program included with the IMAIL fido mail processor).
  17.  
  18.   At the time I wrote this program,  I couldn't find anything to do this
  19.   job.  Using token parsers I had written for other projects and the
  20.   STRUCT.110 file that was included with RA I was able to piece together a
  21.   pretty eleborate program in just a couple of hours.  (More eleborate that
  22.   I'll ever need).
  23.  
  24.   Since that time,  I recall seeing another command line USERS.BBS program
  25.   in a SDS listing.  I don't know if source is included or if it costs
  26.   money or not.  So I released this one free with source in the BBS spirt.
  27.   (Us sysops have enough money problems to worry about without trying to
  28.   grub money off of each other <Grin>).  So please feel free to use and
  29.   distribute these programs as you wish,  No matter what your situation in
  30.   life is.  
  31.  
  32.   Currently the program supports the USERS.BBS file as supported by
  33.   RemoteAccess version 1.10 (This is the old QuickBBS Users.BBS file
  34.   format with a few extra fields).  I'm not up on the current
  35.   QuickBBS world, however this program just might work with Quick
  36.   BBS provided they haven't done anything major to USERS.BBS in the
  37.   last few years.
  38.   
  39.   I may add support in the future for the USERSXI.BBS extension that
  40.   was added to RemoteAccess.  Right now I don't have any need to 
  41.   automatically update these variables,  if you do, it shouldn't be
  42.   a major deal to add that extention to the program.  If you do decide
  43.   to tackle that job,  Please take note of the *vtokens[] structure in
  44.   RUC.C and the token values in RUC.H,  If you follow this convention
  45.   your job will be infinately easy (an afternoon project perhaps).
  46.  
  47.   I only ask a few things:
  48.  
  49.   - If you redistribute, please make sure all files are intact as you found
  50.   them.  If you make modifications,  Clearly mark them as yours in the
  51.   history table in RUC.C.  If you get a chance, send 'em back to Fido
  52.   1:280/307 so I can keep a current revision list here.
  53.  
  54.   - Do not charge for this program.  Shareware librarys, vending machines,
  55.   etc...  Can charge their reasonable disk charge.  There's enough
  56.   competition in the Shareware distribution business that I don't think I
  57.   need to stipulate any maximum dollar amounts.
  58.  
  59.   - Don't come after me if your computer blows up.  I don't think it will.
  60.   However, you never know.  Always make sure you have good backups.  In
  61.   any case,  I am not responsible!
  62.  
  63.   - If you have any comments, bug fixes, etc...  Please contact me via
  64.   E-Mail:  David Bennett @ 1:280/307  or  dave@kcufgat.fidonet.org.  I'll
  65.   see what I can do.  No support persay is provided.
  66.  
  67.   As you can tell,  this is a pretty loose 'license'.  I don't really like
  68.   documenting this kind of stuff.  It's pretty boring work and I'd rather
  69.   get on to the rest of my projects (and life).  This documentation is just
  70.   typed in via my programmers editor.  If you want a hard copy then read it
  71.   into your word processor and edit away (you might clean up my spelling
  72.   and grammer while your at it! <grin>)
  73.  
  74. Summary:
  75.  
  76.   Usage RUC -lb -p D:\PATH -u User_Name -v Var{=NewValue} {-v ...}
  77.  
  78.   -l = listing (no write)  -p = USERS.BBS path           -b = bare mode
  79.   -u = User's name         -v = Value to display|update  -c = User Search
  80.  
  81.   Var is : aflags=-X?         fsmsged=0,1                nokill=0,1
  82.            ansi=0,1           fsmsgview=0,1              password=str
  83.            avt=0,1            group=num                  pending=num
  84.            bflags=-X?         hidden=0,1                 phone=str
  85.            cflags=-X?         hotkeys=0,1                quiet=0,1
  86.            clrscr=0,1         lastdate=##-##-##          screenlength=num
  87.            credit=num         lastpwdchange=##-##-##     security=num
  88.            dataphone=str      lastread=num               todayk=num
  89.            deleted=0,1        lasttime=##:##             uploads=num
  90.            dflags=-X?         location=str               uploadsk=num
  91.            downloads=num      moreprompt=0,1             xferprior=0,1
  92.            downloadsk=num     msgsposted=num
  93.            elapsed=num        nocalls=num
  94.  
  95.   You may use a value of "$" as a variable value to query for user
  96.   input (or stdin input).
  97.  
  98. Command line parameters.
  99.  
  100.   -u[User_Name]             User's name
  101.  
  102.     This is the most important command line option.  It must always be
  103.     specifed.  It denotes the user to list values for or modify.  You
  104.     MUST replace spaces with _'s like so:
  105.  
  106.       -uDavid_Bennett  -or-  -uRyan_P._Rehder
  107.  
  108.   -v[var]{=value -or- $}    Value to display|update  
  109.  
  110.    At least one of these command lines must be present.  This specifys
  111.    a USERS.BBS field that you wish to edit (See the next section
  112.    'USERS.BBS Fields' for more info).  If you just want to list
  113.    a value you just specify the value you wish to see after the -v
  114.    if you want to set the value to something else then you need to 
  115.    use the -vvar=val format.  Some explanation is in order:
  116.  
  117.     -vsecurity          Just shows the users's security to the console.
  118.     -vaflags=?X??????   Turns on the user's A2 flag leave the rest unchanged.
  119.     -vcredit=$          Will prompt you for the users netmail credit value.
  120.     -vansi=0            Turns off the users ansi display.
  121.     -vnokill=1          Makes the user NO KILL so they will never be deleted.
  122.  
  123.   -l                        listing (no write)
  124.  
  125.     When this command is specified,  only a listing of all variables 
  126.     specified (see the -v option) will be shown.  No records will
  127.     be written.
  128.   
  129.   -p[path]                  USERS.BBS path
  130.   
  131.     Specifys the DOS path to the USERS.BBS file like -pd:\ra\
  132.   
  133.   -b = bare mode
  134.  
  135.     Bare mode,  when listing,  Only the actual data values will be output
  136.     this is valuable for chaining to other programs like 'awk' that might
  137.     do certain things based on values in USERS.BBS.
  138.  
  139.   -c = User Search
  140.  
  141.     When you specify this option RUC will search for the user and then
  142.     exit with an errorlevel (-v options are ignored).  The error levels
  143.     can be:
  144.  
  145.       0 ok
  146.       1 could not find user
  147.       2 could not open USERS.BBS
  148.       3 command syntax error (Usage is displayed)
  149.  
  150. USERS.BBS Fields:
  151.  
  152.   These are the field values with you can specify with the -v option:
  153.   See the code section at the bottom of this listing to describe how
  154.   to update each variable.
  155.  
  156.   You may use a value of "$" as a variable value to query for user
  157.   input (or stdin input) in =any= variable definition.
  158.  
  159.   Variable      Update codes    Description
  160.   Token         (See Table      of the
  161.   for -v        Below)          field.
  162.   --------      -----------     ----------------------------------------
  163.  
  164.   aflags           -X?          Flag settings.  You may use '-' to turn
  165.   bflags                        off a flag or 'X' to turn one on.  To
  166.   cflags                        keep the same setting use '?'.  (Better
  167.   dflags                        to see the examples section).
  168.  
  169.   security         num          Users current security level.
  170.  
  171.   fsmsged          0|1          Full Screen message editor.
  172.   
  173.   nokill           0|1          Never delete this user record.
  174.  
  175.   ansi             0|1          User will receive ANSI escape sequences.
  176.  
  177.   fsmsgview        0|1          Full screen message viewer
  178.  
  179.   password         str          The users password.
  180.  
  181.   avt              0|1          User will receive avatar escape sequences.
  182.  
  183.   group            num          Group number for the user
  184.  
  185.   pending          num          Pending netmail credit
  186.  
  187.   credit           num          Netmail credit left.
  188.  
  189.   hidden           0|1          Is user hidden from user list?
  190.  
  191.   phone            str          Users phone number (home phone)
  192.  
  193.   dataphone        str          Second phone (business/data phone)
  194.  
  195.   hotkeys          0|1          Does user use hotkeys (if not then stacks)
  196.  
  197.   quiet            0|1          Ignore on-line messages.
  198.  
  199.   clrscr           0|1          Clear screen codes sent.
  200.  
  201.   lastdate         date         Last date user was on-line.
  202.  
  203.   lastpwdchange    date         Last password change date.
  204.  
  205.   screenlength     num          Screen length for user.
  206.  
  207.   lastread         num          Last message read.
  208.  
  209.   todayk           num          uploads in K for today.
  210.  
  211.   deleted          0|1          Is user deleted.  (Easy to to delete a user!)
  212.  
  213.   lasttime         time         Last time user was on-line.
  214.  
  215.   uploads          num          Number of uploads from the user.
  216.  
  217.   location         str          Users location (City, state)
  218.  
  219.   uploadsk         num          Total uploads in K.
  220.  
  221.   downloads        num          Number of downloads.
  222.  
  223.   moreprompt       0|1          'More (Y/N/=)?' prompt.
  224.  
  225.   xferprior        0|1          Ignore download hours and ratios?
  226.  
  227.   downloadsk       num          Total Downloads in K.
  228.  
  229.   msgsposted       num          Number of messages posted.
  230.  
  231.   elapsed          num          Time used today.
  232.  
  233.   nocalls          num          Number of calls user has made.
  234.  
  235.   Value type codes:
  236.  
  237.     Code        Means
  238.     ----        -----
  239.  
  240.     -X?         You may use '-' to turn off a flag or 'X' to turn one on.  
  241.                 To keep the same setting use '?'.  (See the examples section).
  242.  
  243.     0|1         Use any of "yYxX1+" to turn on, any other value to turn off.
  244.  
  245.     num         A number using the digits 0-9
  246.  
  247.     str         A string value,  this will automatically be truncated if
  248.                 too long.
  249.  
  250.     date        A date value in the format ##-##-##.  This depends on your
  251.                 RemoteAccess date type (Or QuickBBS).
  252.  
  253.     time        A time value in the format hh:mm (military)
  254.  
  255.  
  256. Examples:
  257.  
  258.     RUC -l -uDavid_Bennett -vsecurity       (Displays users security settings)
  259.  
  260.     RUC -uFrank_Kennedy -vaflags=?X??????   (Turns on user flag A2)
  261.  
  262.     RUC -b -uJudy_Caronia -vansi            (Outputs just a 0 or 1 to stdout)
  263.  
  264.     RUC -c -uJoe_Taibi                      (If Joe Taibi exists, ERRORLEVEL=0)
  265.  
  266.     RUC -uMike_Reardon -vcredit=$           (Input mail credit at console)
  267.  
  268.